/*
 * Copyright (c) 2011. This file is public under GPLv3 license.
 * For more information about license please refer to http://www.gnu.org/licenses/gpl.html
 */

package com.freetools.watchdog.model;

/**
 * Description to be do.
 *
 * @author Michael Morozov
 */
public class ConsoleRecordFormatter implements IRecordFormatter
{

    public String format(IModelHolder model, IRecord record)
    {
        StringBuilder builder = new StringBuilder();
        for (IColumn column : model.getColumns())
        {
            builder.append("|").append(record.getValue(column));
        }
        if (builder.length() > 0)
        {
            builder.append("|\n");
        }
        return builder.toString();

    }
}
